package com.huawei.appgallery.search.ui.card;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import com.huawei.appgallery.search.ui.cardbean.SearchSpecialTopicItemCardBean;
import huawei.widget.HwTextView;
import o.cgz;
import o.chy;
import o.cuv.b;
import o.cuv.e;
import o.dof;
import o.evx;

public class SearchSpecialTopicMoreCard extends BaseCompositeCard {
    private HwTextView ˊ;
    private LinearLayout ˋ;
    private HwTextView ˎ;

    public SearchSpecialTopicMoreCard(Context context) {
        super(context);
    }

    public View ˎ() {
        return LayoutInflater.from(this.ʼॱ).inflate(e.ˉ, null);
    }

    public BaseCompositeItemCard ˋ() {
        return new SearchSpecialTopicMoreItemCard(this.ʼॱ);
    }

    protected boolean ˎ(String str, int i) {
        return false;
    }

    public cgz ˏ(View view) {
        super.ˏ(view);
        this.ˋ = (LinearLayout) view.findViewById(b.ˈॱ);
        this.ˊ = (HwTextView) this.ˋ.findViewById(b.ʽᐝ);
        this.ˎ = (HwTextView) this.ˋ.findViewById(b.ʼᐝ);
        return this;
    }

    public void ˏ(CardBean cardBean) {
        super.ˏ(cardBean);
        if (cardBean instanceof SearchSpecialTopicItemCardBean) {
            SearchSpecialTopicItemCardBean searchSpecialTopicItemCardBean = (SearchSpecialTopicItemCardBean) cardBean;
            ॱ(this.ˋ, searchSpecialTopicItemCardBean.ʽ(), searchSpecialTopicItemCardBean.ꜟ());
        }
    }

    private void ॱ(View view, String str, String str2) {
        if (view != null) {
            if (dof.ॱ(str) || dof.ॱ(str2)) {
                view.setVisibility(8);
                return;
            }
            view.setVisibility(0);
            this.ˊ.setText(str);
            this.ˎ.setText(str2);
        }
    }

    public void ॱ(final chy o_chy) {
        this.ॱ = o_chy;
        View ˉ = ˉ();
        if (ˉ != null) {
            ˉ.setOnClickListener(new evx(this) {
                final /* synthetic */ SearchSpecialTopicMoreCard ˋ;

                public void ˋ(View view) {
                    if (o_chy != null) {
                        o_chy.ˏ(0, this.ˋ);
                    }
                }
            });
        }
    }
}
